package org.sample.mqtt.service;

import org.sample.mqtt.component.model.MqttRequest;
import org.sample.mqtt.component.model.MqttResponse;
import org.springframework.messaging.Message;
import java.util.concurrent.CompletableFuture;

/**
 * Created by Alan on 2020/7/18.
 */
public interface MessageService {

    void notify(String deviceId, Object payload);

    CompletableFuture<MqttResponse> request(String deviceId, MqttRequest payload);

    boolean response(Message<MqttResponse> message);
}